package com.bjpowerndoe.ylb.mapper;

import com.bjpowerndoe.ylb.domain.FinanceAccountPO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;

/**
* @author Lenovo
* @description 针对表【u_finance_account(用户财务资金账户表)】的数据库操作Mapper
* @createDate 2023-03-13 16:19:09
* @Entity com.bjpowerndoe.ylb.domain.FinanceAccount
*/
public interface FinanceAccountMapper extends BaseMapper<FinanceAccountPO> {

    //投资，更新账号余额
    int updateAvaiableMoneyForInvest(@Param("uid") Integer uid,
                                     @Param("investMoney") BigDecimal investMoney);


    //收益返还，更新账号余额
    int updateAvaiableMoneyForIncomeBack(@Param("uid") Integer uid,
                                         @Param("bidMoney") BigDecimal bidMoney,
                                         @Param("incomeMoney") BigDecimal incomeMoney);
}




